def prime_factors(n):
    factors = {}
    while n % 2 == 0:
        factors[2] = factors.get(2, 0) + 1
        n = n // 2
    i = 3
    while i * i <= n:
        while n % i == 0:
            factors[i] = factors.get(i, 0) + 1
            n =  n // i
        i += 2
    if n > 2:
        factors[n] = 1
    return factors
n = 2024
factors = prime_factors(n)
factors_strings = []
for i, j in factors.items():
    factors_strings.append(f"{i}")
print(factors_strings[-1])

